
<%-------------------------------------------------------------------
 * 页面名称：forgotPayPass.jsp
 * 功能描述：忘记旧密码
 * Action:
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="cn.agiledata.bank.common.util.WeatherUtil"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
	String path = request.getContextPath();
	String r_email = WeatherUtil.getLoingInfoFromSession(request)
			.getAccount().getEmail();
	String r_mobile = WeatherUtil.getLoingInfoFromSession(request)
			.getAccount().getMobile();
	if (r_email == null)
		r_email = "";
	if (r_mobile == null)
		r_mobile = "";

	String r = null;
	if (request.getParameter("r") != null) {
		r = request.getParameter("r").toString();
	}
%>
<style type="text/css">
<!--
.box {width:100%;margin:auto;}
.off {margin-left:3px;line-height:34px;float:left;width:300px;height:34px;color:#0099CC;font-size:14px;font-weight:bold;text-align:center;background-color:#DCDEDD;cursor: hand;}
.on {margin-left:3px;line-height:34px;float:left;width:300px;height:34px;color:#0099CC;font-size:14px;font-weight:bold;text-align:center;border-top: 1px #CCCCCC solid;border-left:1px #CCCCCC solid;border-right: 1px #CCCCCC solid;cursor: hand;}
-->
</style>
<script type='text/javascript' src='<%=path%>/js/vnv/commonForManage.js'></script>
<script language="javascript">
	function applyByEmail() {
		if (emptyValidate(getObj("email"),"Email地址") != "") {
			return false;
		}
		if (!checkEmail(getObj("email"))) {
			alert("Email地址格式不正确，请重新填写！");
			return false;
		}
		if (emptyValidate(getObj("emailVericode"),"校验码") != "") {
			return false;
		}
		document.forms[0].action = '<%=path%>/page/myspace/applyResetPayPasswordByEmail.do';
		document.forms[0].submit();
	}
	function applyByMobile() {
		if (emptyValidate(getObj("mobile"),"手机号码") != "") {
			return false;
		}
		if (!mobileValidate(getObj("mobile"))) {
			return false;
		}
		if (emptyValidate(getObj("mobileVericode"),"校验码") != "") {
			return false;
		}
		document.forms[0].action = '<%=path%>/page/myspace/applyResetPayPasswordByMobile.do';
		document.forms[0].submit();
	}
	function resetByEmail() {
		location.href = '<%=path%>/page/myspace/toResetPayPasswordByEmail.do';
	}
	function resetByMobile() {
		location.href = '<%=path%>/page/myspace/toResetPayPasswordByMobile.do';
	}
	function showTr(showId, hideId) {
		if ('<%=r_email%>'=='' && showId=='email') {
			alert('您的登录账号没有绑定Email！');
			return;
		}
		if ('<%=r_mobile%>'=='' && showId=='mobile') {
			alert('您的登录账号没有绑定手机！');
			return;
		}
		getObj(showId+'Tr1').style.display = '';
		getObj(showId+'Tr2').style.display = '';
		getObj(showId+'Tr3').style.display = '';
		document.getElementById(showId+'Tab').className = 'on';
		
		getObj(hideId+'Tr1').style.display = 'none';
		getObj(hideId+'Tr2').style.display = 'none';
		getObj(hideId+'Tr3').style.display = 'none';
		document.getElementById(hideId+'Tab').className = 'off';
		
		var now = new Date();
		getObj('verifyImage').src = '<%=path%>/page/util/verifyImage.jsp?now='+now.getTime().toString();
	}
</script>
<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				忘记支付密码
			</div>
			<div class="edit_pass">
				<div class="tab">
					<div class="on" id="emailTab" onclick="showTr('email', 'mobile');">
						使用Email申请重置支付密码
					</div>
					<div class="off" id="mobileTab"
						onclick="showTr('mobile', 'email');">
						使用手机申请重置支付密码
					</div>
				</div>
				<div style="clear:both;"></div>
				<div class="box" id="cont_1">
					<div style="clear:both;"></div>
					<div class="box" id="cont_1">
						<table width="100%" border="0" align="center" cellpadding="5"
							cellspacing="1">
							<form method="post">
							<tr>
								<td colspan="2" class="font_blue">
								<table width="100%" border="0" align="center" cellpadding="7"
										cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
										<tr>
											<td bgcolor="#fffdf5">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="3%" height="25" valign="top"
															style="border-bottom:1px solid #ccc;"></td>
														<td width="97%" align="left" class="red12b"
															style="border-bottom:1px solid #ccc;">
															特别提醒
														</td>
													</tr>
													<tr id="emailTr1">
														<td width="4%" valign="top">
														</td>
														<td width="96%" class="font_gray">
															● 如果您的登录账号是使用Email注册的，或者绑定了Email，我们可以将重置支付密码的
															<span class="text9green">确认码发送到您的Email里</span>。
															<br />
															● 如果您已经得到了该邮件，请直接进入下一步，
															<span class="redColor12px">填写您的Email地址</span>，收到的确认码以及重新设置的支付密码。
														</td>
													</tr>
													<tr id="mobileTr1">
														<td width="4%" valign="top"></td>
														<td width="96%" class="font_gray">
															● 如果您的登录账号是使用手机号码注册的，或者绑定了手机，我们可以将重置支付密码的
															<span class="text9green">确认码发送到您的手机里</span>。
															<br />
															● 如果您已经得到了该短信，请直接进入下一步，
															<span class="redColor12px">填写您的手机号码</span>，收到的确认码以及重新设置的支付密码。
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr id="emailTr2">
								<td width="20%" align="right">
									您的Email地址：
								</td>
								<td width="80%" bgcolor="#FFFFFF">
									<input name="email" type="text" size="40" class="inputStyle"
										value="<%=r_email%>" readonly />
								</td>
							</tr>

							<tr id="mobileTr2">
								<td width="20%" align="right">
									您的手机号码：
								</td>
								<td width="80%" bgcolor="#FFFFFF">
									<input name="mobile" type="text" size="40" class="inputStyle"
										value="<%=r_mobile%>" readonly />
								</td>
							</tr>
							<tr>
								<td width="20%" align="right">
									请输入图片里的校验码：
								</td>
								<td bgcolor="#FFFFFF">
									<input name="vericode" type="text" class="inputStyle" />
									<img id="verifyImage" src="<%=path%>/page/util/verifyImage.jsp"
										width="60" height="24" align="absmiddle" />
								</td>
							</tr>
							<tr id="emailTr3">
								<td align="right">
									&nbsp;
								</td>
								<td height="50" bgcolor="#FFFFFF">
									<input type="button" name="getConfirmCode1" value="获取确认码"
										class="button_style" onclick="applyByEmail();" />
									<input type="button" name="nextStep1" value="下一步"
										class="button_style" onclick="resetByEmail();" />
									<input type="button" name="return" value="返回"
										class="button_style"
										onclick="loading('<%=path%>/route.do?modual=space$account&showTab=3');"
										style="margin-right:20px;" />
								</td>
							</tr>
							<tr id="mobileTr3">
								<td align="right">
									&nbsp;
								</td>
								<td height="50" bgcolor="#FFFFFF">
									<input type="button" name="getConfirmCode2" value="获取确认码"
										class="button_style" onclick="applyByMobile();" />
									<input type="button" name="nextStep2" value="下一步"
										class="button_style" onclick="resetByMobile();" />
									<input type="button" name="return" value="返回"
										class="button_style"
										onclick="loading('<%=path%>/route.do?modual=space$account&showTab=3');"
										style="margin-right:20px;" />
								</td>
							</tr>
							</form>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script language="javascript">
	<% if (r_email.equals("") || (r!=null && r.equals("m"))) { %>
		showTr('mobile', 'email');
	<% } else { %>
		showTr('email', 'mobile');
	<% } %>
</script>